import { z } from 'zod';

// 登录请求的验证 schema
export const loginSchema = z.object({
  username: z.string().min(2, '用户名至少需要2个字符'),
  password: z.string().min(6, '密码至少需要6个字符'),
});

// 刷新Token的验证 schema
export const refreshTokenSchema = z.object({
  refreshToken: z.string().min(10, '刷新令牌无效'),
});

// 导出类型
export type LoginDto = z.infer<typeof loginSchema>;
export type RefreshTokenDto = z.infer<typeof refreshTokenSchema>; 